<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>首页</title>
		<link href="css/mui.min.css" rel="stylesheet" />
		<script src="js/mui.min.js"></script>
		<link href="css/style.css" rel="stylesheet" />
		<style>
			html,
			body {
				background-color: white;
			}
			
			.wrap-search {
				margin: 15px;
				background: #E6E6E6;
				height: 30px;
				border-radius: 5px;
				text-align: center;
			}
			
			.item-img {
				width: 60px;
				height: 90px;
				margin-right: 10px;
			}
		</style>
	</head>

	<body>
		<div class="mui-content" style="background: white;">
			<div class="wrap-search">
				<span class="mui-icon mui-icon-search" style="line-height: 30px;color: #AAAAAA;font-size: 16px;"></span>
				<span style="line-height: 30px;color: #AAAAAA;font-size: 14px;">电影/电视剧/影人</span>
			</div>

			<div id="refreshContainer" class="mui-scroll-wrapper" style="top: 50px;">
				<div class="mui-scroll">
					<ul id="movies" class="mui-table-view">
						<li class="mui-table-view-cell" v-for="(item,index) in movies" :key="index">
							<img class="mui-pull-left item-img" :src="item.cover" />
							<div class="mui-ellipsis dark-big">
								{{item.title}}
							</div>
							<div class="mui-ellipsis">
								<span class="gray-small">{{item.genres}}</span>&nbsp;
								<span v-if="item.score>0" class="orange-small">{{item.score}}分</span>
								<span v-else class="orange-small">暂无评分</span>
							</div>
							<div class="mui-ellipsis gray-small">
								导演：{{item.directors}}
							</div>
							<div class="mui-ellipsis gray-small">
								主演：{{item.casts}}
							</div>
						</li>
					</ul>
				</div>

			</div>
		</div>

		<script src="js/util.js"></script>
		<script src="js/vue.min.js"></script>
		<script type="text/javascript">
			//Vue数据
			var aniShow = {};
			var resp = {"count": 10, "start": 0, "total": 32, "subjects": [{"rating": {"max": 10, "average": 7.2, "stars": "40", "min": 0}, "genres": ["\u52a8\u4f5c", "\u5947\u5e7b", "\u5192\u9669"], "title": "\u52c7\u6562\u8005\u6e38\u620f\uff1a\u51b3\u6218\u4e1b\u6797", "casts": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1044707\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p196.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p196.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p196.webp"}, "name": "\u9053\u6069\u00b7\u5f3a\u68ee", "id": "1044707"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1286162\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p56350.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p56350.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p56350.webp"}, "name": "\u51ef\u6587\u00b7\u54c8\u7279", "id": "1286162"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1049492\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p35722.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p35722.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p35722.webp"}, "name": "\u6770\u514b\u00b7\u5e03\u83b1\u514b", "id": "1049492"}], "collect_count": 37736, "original_title": "Jumanji: Welcome to the Jungle", "subtype": "movie", "directors": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1040862\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1515078777.46.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1515078777.46.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1515078777.46.webp"}, "name": "\u6770\u514b\u00b7\u5361\u65af\u4e39", "id": "1040862"}], "year": "2017", "images": {"small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2506258944.webp", "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2506258944.webp", "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2506258944.webp"}, "alt": "https:\/\/movie.douban.com\/subject\/26586766\/", "id": "26586766"}, {"rating": {"max": 10, "average": 7.2, "stars": "35", "min": 0}, "genres": ["\u5267\u60c5", "\u513f\u7ae5", "\u5bb6\u5ead"], "title": "\u6211\u7684\u5f71\u5b50\u5728\u5954\u8dd1", "casts": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1016668\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p146.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p146.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p146.webp"}, "name": "\u5f20\u9759\u521d", "id": "1016668"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1330245\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1371455504.24.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1371455504.24.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1371455504.24.webp"}, "name": "\u9f99\u54c1\u65ed", "id": "1330245"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1331753\/", "avatars": {"small": "https://img1.doubanio.com\/f\/movie\/ca527386eb8c4e325611e22dfcb04cc116d6b423\/pics\/movie\/celebrity-default-small.png", "large": "https://img3.doubanio.com\/f\/movie\/63acc16ca6309ef191f0378faf793d1096a3e606\/pics\/movie\/celebrity-default-large.png", "medium": "https://img1.doubanio.com\/f\/movie\/8dd0c794499fe925ae2ae89ee30cd225750457b4\/pics\/movie\/celebrity-default-medium.png"}, "name": "\u9ece\u5146\u4e30", "id": "1331753"}], "collect_count": 638, "original_title": "\u6211\u7684\u5f71\u5b50\u5728\u5954\u8dd1", "subtype": "movie", "directors": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1309562\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p25505.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p25505.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p25505.webp"}, "name": "\u65b9\u521a\u4eae", "id": "1309562"}], "year": "2013", "images": {"small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2508256074.webp", "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2508256074.webp", "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2508256074.webp"}, "alt": "https:\/\/movie.douban.com\/subject\/11615929\/", "id": "11615929"}, {"rating": {"max": 10, "average": 7.4, "stars": "40", "min": 0}, "genres": ["\u5267\u60c5", "\u7231\u60c5", "\u6218\u4e89"], "title": "\u65e0\u95ee\u897f\u4e1c", "casts": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1041014\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1359895311.0.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1359895311.0.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1359895311.0.webp"}, "name": "\u7ae0\u5b50\u6021", "id": "1041014"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1041404\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1472787652.32.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1472787652.32.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1472787652.32.webp"}, "name": "\u9ec4\u6653\u660e", "id": "1041404"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1077991\/", "avatars": {"small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1453574419.48.webp", "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1453574419.48.webp", "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1453574419.48.webp"}, "name": "\u5f20\u9707", "id": "1077991"}], "collect_count": 78737, "original_title": "\u65e0\u95ee\u897f\u4e1c", "subtype": "movie", "directors": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1313682\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p19485.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p19485.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p19485.webp"}, "name": "\u674e\u82b3\u82b3", "id": "1313682"}], "year": "2018", "images": {"small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2507572275.webp", "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2507572275.webp", "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2507572275.webp"}, "alt": "https:\/\/movie.douban.com\/subject\/6874741\/", "id": "6874741"}, {"rating": {"max": 10, "average": 5.7, "stars": "30", "min": 0}, "genres": ["\u559c\u5267", "\u7231\u60c5"], "title": "\u524d\u4efb3\uff1a\u518d\u89c1\u524d\u4efb", "casts": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1275667\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p14025.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p14025.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p14025.webp"}, "name": "\u97e9\u5e9a", "id": "1275667"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1275564\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1366015827.84.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1366015827.84.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1366015827.84.webp"}, "name": "\u90d1\u607a", "id": "1275564"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1342252\/", "avatars": {"small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1408089064.98.webp", "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1408089064.98.webp", "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1408089064.98.webp"}, "name": "\u4e8e\u6587\u6587", "id": "1342252"}], "collect_count": 112809, "original_title": "\u524d\u4efb3\uff1a\u518d\u89c1\u524d\u4efb", "subtype": "movie", "directors": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1332171\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1391439365.41.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1391439365.41.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1391439365.41.webp"}, "name": "\u7530\u7fbd\u751f", "id": "1332171"}], "year": "2017", "images": {"small": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2508926717.webp", "large": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2508926717.webp", "medium": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2508926717.webp"}, "alt": "https:\/\/movie.douban.com\/subject\/26662193\/", "id": "26662193"}, {"rating": {"max": 10, "average": 7.7, "stars": "40", "min": 0}, "genres": ["\u52a8\u4f5c", "\u5192\u9669"], "title": "\u592a\u7a7a\u6551\u63f4", "casts": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1327850\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1486282779.93.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1486282779.93.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1486282779.93.webp"}, "name": "\u67f3\u6ce2\u8299\u00b7\u963f\u514b\u8096\u8bfa\u5a03", "id": "1327850"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1023442\/", "avatars": {"small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1368685365.9.webp", "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1368685365.9.webp", "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1368685365.9.webp"}, "name": "\u5f17\u62c9\u5b63\u7c73\u5c14\u00b7\u5f17\u591a\u7ef4\u7434\u79d1\u592b", "id": "1023442"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1194282\/", "avatars": {"small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1416541847.87.webp", "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1416541847.87.webp", "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1416541847.87.webp"}, "name": "\u5df4\u7ef4\u5c14\u00b7\u6377\u5217\u8fde\u79d1", "id": "1194282"}], "collect_count": 12138, "original_title": "\u0421\u0430\u043b\u044e\u0442-7", "subtype": "movie", "directors": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1382988\/", "avatars": {"small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1511446479.18.webp", "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1511446479.18.webp", "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1511446479.18.webp"}, "name": "\u514b\u91cc\u59c6\u00b7\u65af\u5f6d\u79d1", "id": "1382988"}], "year": "2017", "images": {"small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2508922375.webp", "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2508922375.webp", "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2508922375.webp"}, "alt": "https:\/\/movie.douban.com\/subject\/27073291\/", "id": "27073291"}, {"rating": {"max": 10, "average": 7.8, "stars": "40", "min": 0}, "genres": ["\u5267\u60c5", "\u5386\u53f2", "\u6218\u4e89"], "title": "\u82b3\u534e", "casts": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1276105\/", "avatars": {"small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1449935218.59.webp", "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1449935218.59.webp", "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1449935218.59.webp"}, "name": "\u9ec4\u8f69", "id": "1276105"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1366978\/", "avatars": {"small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1512871367.97.webp", "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1512871367.97.webp", "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1512871367.97.webp"}, "name": "\u82d7\u82d7", "id": "1366978"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1357009\/", "avatars": {"small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1504775118.88.webp", "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1504775118.88.webp", "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1504775118.88.webp"}, "name": "\u949f\u695a\u66e6", "id": "1357009"}], "collect_count": 294029, "original_title": "\u82b3\u534e", "subtype": "movie", "directors": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1274255\/", "avatars": {"small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p45667.webp", "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p45667.webp", "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p45667.webp"}, "name": "\u51af\u5c0f\u521a", "id": "1274255"}], "year": "2017", "images": {"small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2507227732.webp", "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2507227732.webp", "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2507227732.webp"}, "alt": "https:\/\/movie.douban.com\/subject\/26862829\/", "id": "26862829"}, {"rating": {"max": 10, "average": 7.2, "stars": "40", "min": 0}, "genres": ["\u52a8\u4f5c", "\u79d1\u5e7b", "\u5192\u9669"], "title": "\u661f\u7403\u5927\u62188\uff1a\u6700\u540e\u7684\u7edd\u5730\u6b66\u58eb", "casts": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1027809\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1452759480.3.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1452759480.3.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1452759480.3.webp"}, "name": "\u9a6c\u514b\u00b7\u54c8\u7c73\u5c14", "id": "1027809"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1027813\/", "avatars": {"small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1482901672.88.webp", "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1482901672.88.webp", "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1482901672.88.webp"}, "name": "\u51ef\u4e3d\u00b7\u8d39\u96ea", "id": "1027813"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1339916\/", "avatars": {"small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1444659264.8.webp", "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1444659264.8.webp", "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1444659264.8.webp"}, "name": "\u9edb\u897f\u00b7\u96f7\u5fb7\u5229", "id": "1339916"}], "collect_count": 61473, "original_title": "Star Wars: The Last Jedi", "subtype": "movie", "directors": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1036605\/", "avatars": {"small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p55599.webp", "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p55599.webp", "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p55599.webp"}, "name": "\u83b1\u6069\u00b7\u7ea6\u7ff0\u900a", "id": "1036605"}], "year": "2017", "images": {"small": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2506694509.webp", "large": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2506694509.webp", "medium": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2506694509.webp"}, "alt": "https:\/\/movie.douban.com\/subject\/22265634\/", "id": "22265634"}, {"rating": {"max": 10, "average": 4.0, "stars": "20", "min": 0}, "genres": ["\u559c\u5267", "\u52a8\u4f5c"], "title": "\u5367\u5e95\u5de8\u661f", "casts": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1023424\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p20210.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p20210.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p20210.webp"}, "name": "\u9648\u5955\u8fc5", "id": "1023424"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1346431\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/pMzDHlD0dJgcel_avatar_uploaded1421546376.16.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/pMzDHlD0dJgcel_avatar_uploaded1421546376.16.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/pMzDHlD0dJgcel_avatar_uploaded1421546376.16.webp"}, "name": "\u674e\u8363\u6d69", "id": "1346431"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1354284\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1465192722.92.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1465192722.92.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1465192722.92.webp"}, "name": "\u674e\u4e00\u6850", "id": "1354284"}], "collect_count": 2601, "original_title": "\u5367\u5e95\u5de8\u661f", "subtype": "movie", "directors": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1025526\/", "avatars": {"small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1057.webp", "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1057.webp", "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1057.webp"}, "name": "\u8c37\u5fb7\u662d", "id": "1025526"}], "year": "2018", "images": {"small": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2508908269.webp", "large": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2508908269.webp", "medium": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2508908269.webp"}, "alt": "https:\/\/movie.douban.com\/subject\/26984538\/", "id": "26984538"}, {"rating": {"max": 10, "average": 6.3, "stars": "35", "min": 0}, "genres": ["\u559c\u5267", "\u72af\u7f6a", "\u60ac\u7591"], "title": "\u8ff7\u9547\u51f6\u6848", "casts": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1054443\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p620.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p620.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p620.webp"}, "name": "\u9a6c\u7279\u00b7\u8fbe\u8499", "id": "1054443"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1054519\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1364.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1364.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1364.webp"}, "name": "\u6731\u4e3d\u5b89\u00b7\u6469\u5c14", "id": "1054519"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1012481\/", "avatars": {"small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1415796703.28.webp", "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1415796703.28.webp", "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1415796703.28.webp"}, "name": "\u5965\u65af\u5361\u00b7\u4f0a\u8428\u514b", "id": "1012481"}], "collect_count": 3834, "original_title": "Suburbicon", "subtype": "movie", "directors": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1054433\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p13776.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p13776.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p13776.webp"}, "name": "\u4e54\u6cbb\u00b7\u514b\u9c81\u5c3c", "id": "1054433"}], "year": "2017", "images": {"small": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2508546069.webp", "large": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2508546069.webp", "medium": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2508546069.webp"}, "alt": "https:\/\/movie.douban.com\/subject\/2133433\/", "id": "2133433"}, {"rating": {"max": 10, "average": 9.0, "stars": "45", "min": 0}, "genres": ["\u559c\u5267", "\u52a8\u753b", "\u5192\u9669"], "title": "\u5bfb\u68a6\u73af\u6e38\u8bb0", "casts": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1370411\/", "avatars": {"small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1489594517.9.webp", "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1489594517.9.webp", "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1489594517.9.webp"}, "name": "\u5b89\u4e1c\u5c3c\u00b7\u5188\u8428\u96f7\u65af", "id": "1370411"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1041009\/", "avatars": {"small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1510634028.69.webp", "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1510634028.69.webp", "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1510634028.69.webp"}, "name": "\u76d6\u5c14\u00b7\u52a0\u897f\u4e9a\u00b7\u8d1d\u7eb3\u5c14", "id": "1041009"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1036383\/", "avatars": {"small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1416762292.89.webp", "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1416762292.89.webp", "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1416762292.89.webp"}, "name": "\u672c\u6770\u660e\u00b7\u5e03\u62c9\u7279", "id": "1036383"}], "collect_count": 374198, "original_title": "Coco", "subtype": "movie", "directors": [{"alt": "https:\/\/movie.douban.com\/celebrity\/1022678\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p13830.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p13830.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p13830.webp"}, "name": "\u674e\u00b7\u6602\u514b\u91cc\u5947", "id": "1022678"}, {"alt": "https:\/\/movie.douban.com\/celebrity\/1370425\/", "avatars": {"small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1497195148.21.webp", "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1497195148.21.webp", "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1497195148.21.webp"}, "name": "\u963f\u5fb7\u91cc\u5b89\u00b7\u83ab\u5229\u7eb3", "id": "1370425"}], "year": "2017", "images": {"small": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2503997609.webp", "large": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2503997609.webp", "medium": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2503997609.webp"}, "alt": "https:\/\/movie.douban.com\/subject\/20495023\/", "id": "20495023"}], "title": "\u6b63\u5728\u4e0a\u6620\u7684\u7535\u5f71-\u5317\u4eac"}
			var data_movies = new Vue({
				el: '#movies',
				data: function(){
					return {
						movies: []
					}
				},mounted:function(){
					
				}
					
				
			});
			mui.init({
			
				pullRefresh: {
					container: "#refreshContainer", //下拉刷新容器标识，querySelector能定位的css选择器均可，比如：id、.class等
					down: {
						auto: false, //可选,默认false.首次加载自动下拉刷新一次
						callback: refreshData //必选，刷新函数，根据具体业务来编写，比如通过ajax从服务器获取新数据；
					},
					up: {
						height: 50, //可选.默认50.触发上拉加载拖动距离
						auto: true, //可选,默认false.自动上拉加载一次
						contentrefresh: "正在加载...", //可选，正在加载状态时，上拉加载控件上显示的标题内容
						contentnomore: '没有更多数据了', //可选，请求完毕若没有更多数据时显示的提醒内容；
						callback: loadMoreData //必选，刷新函数，根据具体业务来编写，比如通过ajax从服务器获取新数据；
					}
				}
			});

			//刷新数据，重新调用接口
			function refreshData() {
				//请求热映列表接口
				mui.getJSON('https://api.douban.com/v2/movie/in_theaters', {
					start:0,
					count:10
				}, function(resp) {
					data_movies.movies.splice(0,data_movies.movies.length);
					data_movies.movies = data_movies.movies.concat(convert(resp.subjects));
					mui('#refreshContainer').pullRefresh().endPulldownToRefresh();
					mui('#refreshContainer').pullRefresh().refresh(true);
					
				});
			}
			//请求下一页数据
			function loadMoreData(){
				//请求热映列表接口
				mui.getJSON('https://api.douban.com/v2/movie/in_theaters', {
					start:data_movies.movies.length,
					count:10
				}, function(resp) {
					data_movies.movies = data_movies.movies.concat(convert(resp.subjects));
					mui('#refreshContainer').pullRefresh().endPullupToRefresh(data_movies.movies.length > resp.total);
				
				});
				data_movies.movies = data_movies.movies.concat(JSON.parse(JSON.stringify(convert(resp.subjects))));
				mui('#refreshContainer').pullRefresh().endPullupToRefresh(false);
			}

			mui.plusReady(function() {
				var self = plus.webview.currentWebview(),
					nviews = self.getSubNViews(),
					subpages = util.options.subpages;
				//创建子webview窗口 并初始化
				util.initSubpage();
				var activePage = plus.webview.currentWebview();

				//给每个view 添加监听点击切换
				for(var i = 0; i < 3; i++) {
					nviews[i].addEventListener('click', clickEvent, false);
				}

				// 自定义 tab 点击事件
				function clickEvent(e) {
					var currId = e.target.id,
						currIndex = parseInt(currId.substr(currId.length - 1, 1) - 1),
						currView = self.getStyle().subNViews[currIndex];

					// 匹配对应tab窗口	
					if(currIndex > 0) {
						targetPage = plus.webview.getWebviewById(subpages[currIndex - 1]);
					} else {
						targetPage = plus.webview.currentWebview();
					}

					if(targetPage == activePage) {
						return;
					}

					if(currIndex !== 3) {
						//底部选项卡切换
						util.toggleNview(currView, currIndex);
						// 子页面切换
						util.changeSubpage(targetPage, activePage);
						//更改当前活跃的页面
						activePage = targetPage;
					}
				}
			});
			
			
			//给搜索框添加点击事件
			mui('.wrap-search')[0].addEventListener('tap', function() {
				mui.openWindow({
					id:'search',
					url:'./html/search.html'
				});
			});

			
			
			//预加载电影详情页面
			var detailPage = mui.preload({
				id:'movie-detail',
				url:'./html/movie-detail.html'
			});
			
			//打开电影详情页面
			function open_detail(item){
				//触发详情页面的movieId事件
				mui.fire(detailPage,'movieId',{
					id:item.id
				});
				//打开
				mui.openWindow({
					id:'movie-detail'
				});
			}
			
			//数据转换
			function convert(items) {
				var newItems = [];
				//遍历items
				items.forEach(function(item) {
					var genres = item.genres.toString().replace(/,/g, ' / ');
					//导演
					var directors = '';
					for(var i = 0; i < item.directors.length; i++) {
						directors += item.directors[i].name;
						if(i != item.directors.length - 1) {
							directors += ' / ';
						}
					}
					//演员
					var casts = '';
					for(var i = 0; i < item.casts.length; i++) {
						casts += item.casts[i].name;
						if(i != item.casts.length - 1) {
							casts += ' / ';
						}
					}

					newItems.push({
						id: item.id,
						title: item.title,
						genres: genres,
						cover: item.images.large,
						score: item.rating.average,
						directors: directors,
						casts: casts
					});
				});

				return newItems;
			}
		</script>
	</body>

</html>